package com.spring.beans.factory.support;

import com.spring.beans.BeansException;
import com.spring.beans.factory.config.BeanDefinition;


import java.lang.reflect.Constructor;

public class CglibSubclassingInstantiationStrategy implements InstantiationStrategy {
    @Override
    public Object instantiate(BeanDefinition beanDefinition, String beanName, Constructor ctor, Object[] args) throws BeansException {
        return null;
    }
//
//    @Override
//    public Object instantiate(BeanDefinition beanDefinition, String beanName, Constructor ctor, Object[] args) throws BeansException {
//        Enhancer enhancer = new Enhancer();
//        enhancer.setSuperclass(beanDefinition.getBeanClass());
//        enhancer.setCallback(new NoOp() {
//            @Override
//            public int hashCode() {
//                return super.hashCode();
//            }
//        });
//        if (null == ctor) return enhancer.create();
//        return enhancer.create(ctor.getParameterTypes(), args);
//    }

}
